home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-21 | 32.6 KB | 1,205 lines |
- Newsgroups: comp.sources.misc
- From: root@lsrhs.UUCP (Mr System)
- Subject: v13i063: chemtab patch 1
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 13, Issue 63
- Submitted-by: root@lsrhs.UUCP (Mr System)
- Archive-name: chemtab/patch01
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: README.PATCH01 patch01 VERSION
- # Wrapped by pulsar@lsrhs on Thu Jun 21 00:26:42 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'README.PATCH01' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README.PATCH01'\"
- else
- echo shar: Extracting \"'README.PATCH01'\" \(2116 characters\)
- sed "s/^X//" >'README.PATCH01' <<'END_OF_FILE'
- Hello! By taking the time to pull this patch off the net, I assume
- that you have unpacked and compiled Chemtab Version 1.0. I'm glad
- that you could find a use for my program, entertainment, education or
- what have you. This is the first patch to Chemtab V1.0, which contains
- minimal patches.
- X *** I ask that someone out there, perhaps you, would look at the
- X code for wgetnum() in dogph.c. The delete does not work as
- X it should, and I have tried to fix it too many times and failed.
- X Please, if you manage to fix it up, send the fixes to me and
- X I will post them to the world (with a letter of gratitude!)
- X
- Here is what's fixed:
- X
- Problem 1) If the transcript file could not be opened, the core dumped
- X because the program did not check to see if there was an error
- X opening this file. This has been corrected.
- Problem 2) A curses macro (wgetch()) wal called with no argument. This made
- X no difference on my system (strange) but it did on others.
- X This was fixed.
- Problem 3) The program seemed to think it could get away with making
- X a transcript of what you were doing even if you typed NO for
- X a transcript. This SHOULD be fixed!
- Problem 4) In cleanup.c, I forgot to make the program portable by letting
- X people use their own lpr program. Files tune.h and cleanup.c
- X were changed to fix this small problem. Please check tune.h
- X and make sure every pathname and program name will work on your
- X system!
- Misc) Unused and redeclared variables have been fixed, with the help of
- X lint!
- X
- Thanks to Peter Knoppers - knop@duteca.tudelft.nl in the Netherlands
- for his speedy and helpful feedback to get these patches out ASAP so that
- people can actually USE the program.
- X
- X*** Anyone who is interested in hacking the code up to make the program
- X completely SYSV portable (or any other system for that matter) please
- X do, and send the diffs to me!
- X
- X*** Chemtab 2.0 is currently being written .. Chemtab 2.0 is the MAC version.
- X hopefully, once it is finished, it will be available to the general
- X public for use!
- X
- Thanks for reading this whole thing! - Jim
- END_OF_FILE
- if test 2116 -ne `wc -c <'README.PATCH01'`; then
- echo shar: \"'README.PATCH01'\" unpacked with wrong size!
- fi
- chmod +x 'README.PATCH01'
- # end of 'README.PATCH01'
- fi
- if test -f 'patch01' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch01'\"
- else
- echo shar: Extracting \"'patch01'\" \(28115 characters\)
- sed "s/^X//" >'patch01' <<'END_OF_FILE'
- diff -c3 Original/cleanup.c Patch01/cleanup.c
- X*** Original/cleanup.c Wed Jun 20 23:17:43 1990
- X--- Patch01/cleanup.c Wed Jun 20 23:47:31 1990
- X***************
- X*** 8,13
- X #include <stdio.h>
- X #include "windows.h"
- X #include "variables.h"
- X
- X /*
- X * cleanup() - no input
- X
- X--- 8,14 -----
- X #include <stdio.h>
- X #include "windows.h"
- X #include "variables.h"
- X+ #include "tune.h"
- X
- X /*
- X * cleanup() - no input
- X***************
- X*** 31,37
- X wprintw(btm, "yes");
- X wrefresh(btm);
- X fclose(fp);
- X! sprintf(str, "/usr/local/bin/letter -h %d.chemtab", getpid());
- X system(str);
- X wclear(btm);
- X wrefresh(btm);
- X
- X--- 32,38 -----
- X wprintw(btm, "yes");
- X wrefresh(btm);
- X fclose(fp);
- X! sprintf(str, "%s %d.chemtab", PRINTER, getpid());
- X system(str);
- X wclear(btm);
- X wrefresh(btm);
- diff -c3 Original/dogph.c Patch01/dogph.c
- X*** Original/dogph.c Wed Jun 20 23:17:46 1990
- X--- Patch01/dogph.c Wed Jun 20 23:47:30 1990
- X***************
- X*** 22,28
- X WINDOW *win;
- X {
- X char c, glop[80], *ptr;
- X! int i, stopfl = 0, y, x;
- X
- X noecho(); crmode();
- X for (i = 0; i < 80; i++) {
- X
- X--- 22,28 -----
- X WINDOW *win;
- X {
- X char c, glop[80], *ptr;
- X! int stopfl = 0, y;
- X
- X noecho(); crmode();
- X for (i = 0; i < 80; i++) {
- diff -c3 Original/element.c Patch01/element.c
- X*** Original/element.c Wed Jun 20 23:17:48 1990
- X--- Patch01/element.c Wed Jun 20 23:47:31 1990
- X***************
- X*** 21,29
- X */
- X readelem()
- X {
- X! char foo[160]; /* input line */
- X! int i; /* for loop int */
- X! FILE *fp; /* File pointer for PERTABLE */
- X
- X if ((fp = fopen(PERTABLE, "r")) == NULL) { /* Open it please */
- X bot("Cannot open element data file");
- X
- X--- 21,28 -----
- X */
- X readelem()
- X {
- X! char inp[160]; /* input line */
- X! FILE *fptr; /* File pointer for PERTABLE */
- X
- X if ((fptr = fopen(PERTABLE, "r")) == NULL) { /* Open it please */
- X bot("Cannot open element data file");
- X***************
- X*** 25,31
- X int i; /* for loop int */
- X FILE *fp; /* File pointer for PERTABLE */
- X
- X! if ((fp = fopen(PERTABLE, "r")) == NULL) { /* Open it please */
- X bot("Cannot open element data file");
- X sleep(3);
- X cleanup();
- X
- X--- 24,30 -----
- X char inp[160]; /* input line */
- X FILE *fptr; /* File pointer for PERTABLE */
- X
- X! if ((fptr = fopen(PERTABLE, "r")) == NULL) { /* Open it please */
- X bot("Cannot open element data file");
- X sleep(3);
- X cleanup();
- X***************
- X*** 31,38
- X cleanup();
- X }
- X
- X! fgets(foo, 160, fp); /* Read in comment line */
- X! fgets(foo, 160, fp); /* Eat the spacer */
- X
- X for (i = 1; i < MAXLM+1; i++) { /* Munch that damn line!! */
- X if (fscanf(fp, "%s%s%d%d%d%d%d%d%d%d%d%f%f%f%f\n",
- X
- X--- 30,37 -----
- X cleanup();
- X }
- X
- X! fgets(inp, 160, fptr); /* Read in comment line */
- X! fgets(inp, 160, fptr); /* Eat the spacer */
- X
- X for (i = 1; i < MAXLM+1; i++) { /* Munch that damn line!! */
- X if (fscanf(fptr, "%s%s%d%d%d%d%d%d%d%d%d%f%f%f%f\n",
- X***************
- X*** 35,41
- X fgets(foo, 160, fp); /* Eat the spacer */
- X
- X for (i = 1; i < MAXLM+1; i++) { /* Munch that damn line!! */
- X! if (fscanf(fp, "%s%s%d%d%d%d%d%d%d%d%d%f%f%f%f\n",
- X e[i].name, e[i].sym, &e[i].anum, &e[i].amass, &e[i].fam,
- X &e[i].row, &e[i].val, &e[i].melt, &e[i].boil,
- X &e[i].fio, &e[i].year, &e[i].eneg, &e[i].spht,
- X
- X--- 34,40 -----
- X fgets(inp, 160, fptr); /* Eat the spacer */
- X
- X for (i = 1; i < MAXLM+1; i++) { /* Munch that damn line!! */
- X! if (fscanf(fptr, "%s%s%d%d%d%d%d%d%d%d%d%f%f%f%f\n",
- X e[i].name, e[i].sym, &e[i].anum, &e[i].amass, &e[i].fam,
- X &e[i].row, &e[i].val, &e[i].melt, &e[i].boil,
- X &e[i].fio, &e[i].year, &e[i].eneg, &e[i].spht,
- X***************
- X*** 42,46
- X &e[i].dens, &e[i].arad) == EOF)
- X break;
- X }
- X! fclose(fp); /* Be nice and neat */
- X }
- X
- X--- 41,45 -----
- X &e[i].dens, &e[i].arad) == EOF)
- X break;
- X }
- X! fclose(fptr); /* Be nice and neat */
- X }
- diff -c3 Original/esort.c Patch01/esort.c
- X*** Original/esort.c Wed Jun 20 23:17:50 1990
- X--- Patch01/esort.c Wed Jun 20 23:47:31 1990
- X***************
- X*** 27,33
- X */
- X esort()
- X {
- X! float x = 0.0; /* floating integer for cmp */
- X
- X if (dosort[0].wch == 0) /* No chars to sort */
- X return(1);
- X
- X--- 27,33 -----
- X */
- X esort()
- X {
- X! x = 0.0; /* floating integer for cmp */
- X
- X if (dosort[0].wch == 0) /* No chars to sort */
- X return(1);
- diff -c3 Original/looke.c Patch01/looke.c
- X*** Original/looke.c Wed Jun 20 23:17:52 1990
- X--- Patch01/looke.c Wed Jun 20 23:47:30 1990
- X***************
- X*** 70,76
- X
- X looke()
- X {
- X! char *str, /* Random input string */
- X srch[80], /* String comparison */
- X c = '5'; /* choice input */
- X noecho(); crmode();
- X
- X--- 70,76 -----
- X
- X looke()
- X {
- X! char *strn, /* Random input string */
- X srch[80], /* String comparison */
- X c = '5'; /* choice input */
- X noecho(); crmode();
- X***************
- X*** 90,96
- X noecho();
- X crmode();
- X while (c < '1' || c > '4')
- X! c = wgetch();
- X
- X if (c == '4') {
- X wprintw(mn, "Return to Main Menu.");
- X
- X--- 90,96 -----
- X noecho();
- X crmode();
- X while (c < '1' || c > '4')
- X! c = wgetch(mn);
- X
- X if (c == '4') {
- X wprintw(mn, "Return to Main Menu.");
- X***************
- X*** 135,142
- X wclear(mn); wrefresh(mn);
- X for (i = 1; i < MAXLM; i++) { /* Look for appropriate element */
- X switch(c) { /* then display it */
- X! case '1': str = e[i].name;
- X! if (strncmp(srch, str, sizeof(srch)) == 0) {
- X disp(e[i].anum); goto nd;
- X } else
- X break;
- X
- X--- 135,142 -----
- X wclear(mn); wrefresh(mn);
- X for (i = 1; i < MAXLM; i++) { /* Look for appropriate element */
- X switch(c) { /* then display it */
- X! case '1': strn = e[i].name;
- X! if (strncmp(srch, strn, sizeof(srch)) == 0) {
- X disp(e[i].anum); goto nd;
- X } else
- X break;
- X***************
- X*** 145,152
- X disp(e[i].anum); goto nd;
- X } else
- X break;
- X! case '3': str = e[i].sym;
- X! if (strncmp(srch, str, sizeof(srch)) == 0) {
- X disp(e[i].anum); goto nd;
- X } else
- X break;
- X
- X--- 145,152 -----
- X disp(e[i].anum); goto nd;
- X } else
- X break;
- X! case '3': strn = e[i].sym;
- X! if (strncmp(srch, strn, sizeof(srch)) == 0) {
- X disp(e[i].anum); goto nd;
- X } else
- X break;
- X***************
- X*** 159,163
- X wclear(mn); wrefresh(mn);
- X return(0);
- X }
- X-
- X-
- X
- X--- 159,161 -----
- X wclear(mn); wrefresh(mn);
- X return(0);
- X }
- diff -c3 Original/main.c Patch01/main.c
- X*** Original/main.c Wed Jun 20 23:17:54 1990
- X--- Patch01/main.c Wed Jun 20 23:31:33 1990
- X***************
- X*** 36,44
- X #ifdef TRANSCRIPT /* Log time and user in file */
- X time(&secs);
- X bot("Logging you in..");
- X! fp = fopen(TRANSCRIPT, "a+");
- X! fprintf(fp, "%s logged in at %s", getenv("USER"), ctime(&secs));
- X! fclose(fp);
- X #endif TRANSCRIPT
- X
- X clear();
- X
- X--- 36,51 -----
- X #ifdef TRANSCRIPT /* Log time and user in file */
- X time(&secs);
- X bot("Logging you in..");
- X! if ((fp = fopen(TRANSCRIPT, "a+")) != NULL) {
- X! fprintf(fp, "%s logged in at %s", getenv("USER"), ctime(&secs));
- X! fclose(fp);
- X! } else {
- X! bot("Please set the TRANSCRIPT define in tune.h to work on your machine.");
- X! sleep(10);
- X! bot("The program will exit so you can do this now.");
- X! sleep(5);
- X! cleanup();
- X! }
- X #endif TRANSCRIPT
- X
- X clear();
- X***************
- X*** 66,72
- X wrefresh(btm); /* transcript flag (trans) */
- X c = getchar();
- X if (c == 'y') {
- X! trans++;
- X wclear(btm);
- X mvwaddstr(btm, 0, 0, "Please enter your last name for the transcript: ");
- X wrefresh(btm);
- X
- X--- 73,79 -----
- X wrefresh(btm); /* transcript flag (trans) */
- X c = getchar();
- X if (c == 'y') {
- X! trans = 1;
- X wclear(btm);
- X mvwaddstr(btm, 0, 0, "Please enter your last name for the transcript: ");
- X wrefresh(btm);
- X***************
- X*** 75,81
- X sprintf(str, "%d.chemtab", getpid());
- X fp = fopen(str, "w");
- X fprintf(fp, "*** ChemTab - Periodic Table Database - Transcript for >> %s <<", lnm);
- X- /* \n will be added later! */
- X }
- X else if (c != 'n') {
- X mvwaddstr(btm, 0, 58, "(y or n) ");
- X
- X--- 82,87 -----
- X sprintf(str, "%d.chemtab", getpid());
- X fp = fopen(str, "w");
- X fprintf(fp, "*** ChemTab - Periodic Table Database - Transcript for >> %s <<", lnm);
- X }
- X else if (c != 'n') {
- X mvwaddstr(btm, 0, 58, "(y or n) ");
- diff -c3 Original/ptabl.c Patch01/ptabl.c
- X*** Original/ptabl.c Wed Jun 20 23:17:55 1990
- X--- Patch01/ptabl.c Wed Jun 20 23:47:31 1990
- X***************
- X*** 24,30
- X {
- X FILE *fd; /* Periodic table is in a file */
- X char foo[80]; /* And we need to read it into something */
- X! int x;
- X
- X if ((fd = fopen(TABLE, "r")) == NULL) {
- X bot("Cannot open Periodic Table for reading..");
- X
- X--- 24,30 -----
- X {
- X FILE *fd; /* Periodic table is in a file */
- X char foo[80]; /* And we need to read it into something */
- X! int n; /* element number reference */
- X
- X if ((fd = fopen(TABLE, "r")) == NULL) {
- X bot("Cannot open Periodic Table for reading..");
- X***************
- X*** 42,52
- X fclose(fd);
- X tablsort(); /* Put characteristics on screen */
- X for (i = 1; i < gtot+1; i++) { /* format and print element sym. */
- X! x = sub1[i];
- X! if (e[x].anum > 56 && e[x].anum < 72)
- X! wmove(graph, horz[8], (13 + ((e[x].fam - 1) * 3)));
- X! else if (e[x].anum > 88 && e[x].anum < 104)
- X! wmove(graph, horz[9], (13 + ((e[x].fam - 1) * 3)));
- X else
- X wmove(graph, horz[e[x].row], (1 + ((e[x].fam - 1) * 3)));
- X
- X
- X--- 42,52 -----
- X fclose(fd);
- X tablsort(); /* Put characteristics on screen */
- X for (i = 1; i < gtot+1; i++) { /* format and print element sym. */
- X! n = sub1[i];
- X! if (e[n].anum > 56 && e[n].anum < 72)
- X! wmove(graph, horz[8], (13 + ((e[n].fam - 1) * 3)));
- X! else if (e[n].anum > 88 && e[n].anum < 104)
- X! wmove(graph, horz[9], (13 + ((e[n].fam - 1) * 3)));
- X else
- X wmove(graph, horz[e[n].row], (1 + ((e[n].fam - 1) * 3)));
- X
- X***************
- X*** 48,54
- X else if (e[x].anum > 88 && e[x].anum < 104)
- X wmove(graph, horz[9], (13 + ((e[x].fam - 1) * 3)));
- X else
- X! wmove(graph, horz[e[x].row], (1 + ((e[x].fam - 1) * 3)));
- X
- X wstandout(graph);
- X wprintw(graph, "%2s", e[x].sym);
- X
- X--- 48,54 -----
- X else if (e[n].anum > 88 && e[n].anum < 104)
- X wmove(graph, horz[9], (13 + ((e[n].fam - 1) * 3)));
- X else
- X! wmove(graph, horz[e[n].row], (1 + ((e[n].fam - 1) * 3)));
- X
- X wstandout(graph);
- X wprintw(graph, "%2s", e[n].sym);
- X***************
- X*** 51,57
- X wmove(graph, horz[e[x].row], (1 + ((e[x].fam - 1) * 3)));
- X
- X wstandout(graph);
- X! wprintw(graph, "%2s", e[x].sym);
- X wrefresh(graph);
- X wstandend(graph);
- X }
- X
- X--- 51,57 -----
- X wmove(graph, horz[e[n].row], (1 + ((e[n].fam - 1) * 3)));
- X
- X wstandout(graph);
- X! wprintw(graph, "%2s", e[n].sym);
- X wrefresh(graph);
- X wstandend(graph);
- X }
- diff -c3 Original/schar.c Patch01/schar.c
- X*** Original/schar.c Wed Jun 20 23:17:59 1990
- X--- Patch01/schar.c Wed Jun 20 23:47:32 1990
- X***************
- X*** 86,93
- X */
- X schar()
- X {
- X! int x, cur;
- X! char str[50];
- X
- X noecho();
- X crmode();
- X
- X--- 86,92 -----
- X */
- X schar()
- X {
- X! int n, cur;
- X
- X noecho();
- X crmode();
- X***************
- X*** 112,119
- X echo();
- X nocrmode();
- X gets(str);
- X! x = atoi(str);
- X! switch(x) {
- X case 14: /* Main Menu */
- X esort();
- X return(0);
- X
- X--- 111,118 -----
- X echo();
- X nocrmode();
- X gets(str);
- X! n = atoi(str);
- X! switch(n) {
- X case 14: /* Main Menu */
- X esort();
- X return(0);
- X***************
- X*** 130,136
- X wrefresh(mn);
- X goto lop1;
- X default:
- X! if (x < 1 || x > 15)
- X goto lop2;
- X else
- X break;
- X
- X--- 129,135 -----
- X wrefresh(mn);
- X goto lop1;
- X default:
- X! if (n < 1 || n > 15)
- X goto lop2;
- X else
- X break;
- X***************
- X*** 136,142
- X break;
- X }
- X cur = whichone();
- X! if (dosort[0].wch == x || dosort[1].wch == x) {
- X bot("This characteristic is already being sorted.");
- X sleep(3);
- X bot(" ");
- X
- X--- 135,141 -----
- X break;
- X }
- X cur = whichone();
- X! if (dosort[0].wch == n || dosort[1].wch == n) {
- X bot("This characteristic is already being sorted.");
- X sleep(3);
- X bot(" ");
- X***************
- X*** 146,152
- X if (getchar() == 'y') {
- X bot(" ");
- X for (i = 0; i < 2; i++) {
- X! if (dosort[i].wch == x)
- X cur = i;
- X }
- X goto lop3;
- X
- X--- 145,151 -----
- X if (getchar() == 'y') {
- X bot(" ");
- X for (i = 0; i < 2; i++) {
- X! if (dosort[i].wch == n)
- X cur = i;
- X }
- X goto lop3;
- X***************
- X*** 166,172
- X bot(" ");
- X goto lop2;
- X }
- X! lop3: dosort[cur].wch = x;
- X wclear(mn); wrefresh(mn);
- X wmove(mn, 1, 0);
- X wprintw(mn, "You would like to select some elements with their '%s' being", sopts[x].chst);
- X
- X--- 165,171 -----
- X bot(" ");
- X goto lop2;
- X }
- X! lop3: dosort[cur].wch = n;
- X wclear(mn); wrefresh(mn);
- X wmove(mn, 1, 0);
- X wprintw(mn, "You would like to select some elements with their '%s' being", sopts[n].chst);
- X***************
- X*** 169,175
- X lop3: dosort[cur].wch = x;
- X wclear(mn); wrefresh(mn);
- X wmove(mn, 1, 0);
- X! wprintw(mn, "You would like to select some elements with their '%s' being", sopts[x].chst);
- X mvwaddstr(mn, 3, 0, "1] Equal To");
- X wmove(mn, 4, 0); wprintw(mn, "2] %s", sopts[x].upline);
- X wmove(mn, 5, 0); wprintw(mn, "3] %s", sopts[x].dnline);
- X
- X--- 168,174 -----
- X lop3: dosort[cur].wch = n;
- X wclear(mn); wrefresh(mn);
- X wmove(mn, 1, 0);
- X! wprintw(mn, "You would like to select some elements with their '%s' being", sopts[n].chst);
- X mvwaddstr(mn, 3, 0, "1] Equal To");
- X wmove(mn, 4, 0); wprintw(mn, "2] %s", sopts[n].upline);
- X wmove(mn, 5, 0); wprintw(mn, "3] %s", sopts[n].dnline);
- X***************
- X*** 171,178
- X wmove(mn, 1, 0);
- X wprintw(mn, "You would like to select some elements with their '%s' being", sopts[x].chst);
- X mvwaddstr(mn, 3, 0, "1] Equal To");
- X! wmove(mn, 4, 0); wprintw(mn, "2] %s", sopts[x].upline);
- X! wmove(mn, 5, 0); wprintw(mn, "3] %s", sopts[x].dnline);
- X wmove(mn, 6, 0); wprintw(mn, "4] Exit (will erase characteristic)");
- X mvwaddstr(mn, 8, 9, "the amount you select next.");
- X if (hlp)
- X
- X--- 170,177 -----
- X wmove(mn, 1, 0);
- X wprintw(mn, "You would like to select some elements with their '%s' being", sopts[n].chst);
- X mvwaddstr(mn, 3, 0, "1] Equal To");
- X! wmove(mn, 4, 0); wprintw(mn, "2] %s", sopts[n].upline);
- X! wmove(mn, 5, 0); wprintw(mn, "3] %s", sopts[n].dnline);
- X wmove(mn, 6, 0); wprintw(mn, "4] Exit (will erase characteristic)");
- X mvwaddstr(mn, 8, 9, "the amount you select next.");
- X if (hlp)
- X***************
- X*** 192,198
- X wclear(mn);
- X wrefresh(mn);
- X wmove(mn, 1, 0);
- X! wprintw(mn, "You want to select some elements with the '%s' being ", sopts[x].chst);
- X switch(dosort[cur].sgn) {
- X case EQUAL:
- X wprintw(mn, "Equal to");
- X
- X--- 191,197 -----
- X wclear(mn);
- X wrefresh(mn);
- X wmove(mn, 1, 0);
- X! wprintw(mn, "You want to select some elements with the '%s' being ", sopts[n].chst);
- X switch(dosort[cur].sgn) {
- X case EQUAL:
- X wprintw(mn, "Equal to");
- X***************
- X*** 198,204
- X wprintw(mn, "Equal to");
- X break;
- X case GREATER:
- X! wprintw(mn, "%s", sopts[x].upline);
- X break;
- X default:
- X wprintw(mn, "%s", sopts[x].dnline);
- X
- X--- 197,203 -----
- X wprintw(mn, "Equal to");
- X break;
- X case GREATER:
- X! wprintw(mn, "%s", sopts[n].upline);
- X break;
- X default:
- X wprintw(mn, "%s", sopts[n].dnline);
- X***************
- X*** 201,207
- X wprintw(mn, "%s", sopts[x].upline);
- X break;
- X default:
- X! wprintw(mn, "%s", sopts[x].dnline);
- X break;
- X }
- X if (hlp)
- X
- X--- 200,206 -----
- X wprintw(mn, "%s", sopts[n].upline);
- X break;
- X default:
- X! wprintw(mn, "%s", sopts[n].dnline);
- X break;
- X }
- X if (hlp)
- diff -c3 Original/scrmisc.c Patch01/scrmisc.c
- X*** Original/scrmisc.c Wed Jun 20 23:18:00 1990
- X--- Patch01/scrmisc.c Wed Jun 20 23:47:30 1990
- X***************
- X*** 15,22
- X *
- X * purpose: Take ''str'' and put it on ''btm'' (window)
- X */
- X! bot(str)
- X! char *str;
- X {
- X wclear(btm); mvwaddstr(btm, 0, 0, str); wrefresh(btm);
- X }
- X
- X--- 15,22 -----
- X *
- X * purpose: Take ''str'' and put it on ''btm'' (window)
- X */
- X! bot(strn)
- X! char *strn;
- X {
- X wclear(btm); mvwaddstr(btm, 0, 0, strn); wrefresh(btm);
- X }
- X***************
- X*** 18,24
- X bot(str)
- X char *str;
- X {
- X! wclear(btm); mvwaddstr(btm, 0, 0, str); wrefresh(btm);
- X }
- X
- X /*
- X
- X--- 18,24 -----
- X bot(strn)
- X char *strn;
- X {
- X! wclear(btm); mvwaddstr(btm, 0, 0, strn); wrefresh(btm);
- X }
- X
- X /*
- X***************
- X*** 40,47
- X WINDOW *win;
- X int f, z;
- X {
- X! int icn; /* Internal count */
- X! if (trans) {
- X if (!z) {
- X for (i = 0; i < 5; i++) {
- X fputc('\n', fp);
- X
- X--- 40,49 -----
- X WINDOW *win;
- X int f, z;
- X {
- X! int icn = 0; /* Internal count */
- X! if (!trans)
- X! return(1);
- X! else {
- X if (!z) {
- X for (i = 0; i < 5; i++) {
- X fputc('\n', fp);
- diff -c3 Original/tune.h Patch01/tune.h
- X*** Original/tune.h Wed Jun 20 23:18:30 1990
- X--- Patch01/tune.h Wed Jun 20 23:47:31 1990
- X***************
- X*** 4,9
- X * tune.h Site Specifics
- X */
- X
- X /* PERTABLE is the path up to and including the list of elements, elist */
- X #define PERTABLE "/u/pulsar/Utilities/Chem/Chemtab/elist"
- X
- X
- X--- 4,14 -----
- X * tune.h Site Specifics
- X */
- X
- X+ /* PRINTER is the printer program or shell script you use to print on
- X+ the desired printer for Chemtab output. Preferably, when using lpr,
- X+ you want to add the '-h' function to skip the header page. */
- X+ #define PRINTER "/usr/local/bin/letter -h"
- X+
- X /* PERTABLE is the path up to and including the list of elements, elist */
- X #define PERTABLE "/u/pulsar/Utilities/Chem/Chemtab/elist"
- X
- X***************
- X*** 13,18
- X /* TABLE is the path up to and including the periodic table outline, pertab */
- X #define TABLE "/u/pulsar/Utilities/Chem/Chemtab/pertab"
- X
- X! /* TRANSCRIPT is the path of a logfile of who uses the program.
- X if it is not defined, then no log is made. */
- X #define TRANSCRIPT "/u/pulsar/Utilities/Chem/Chemtab/logfile"
- X
- X--- 18,23 -----
- X /* TABLE is the path up to and including the periodic table outline, pertab */
- X #define TABLE "/u/pulsar/Utilities/Chem/Chemtab/pertab"
- X
- X! /* TRANSCRIPT is the path to the logfile which lists who uses the program.
- X if it is not defined, then no log is made. */
- X #define TRANSCRIPT "/u/pulsar/Utilities/Chem/Chemtab/logfile"
- diff -c3 Original/vdata.c Patch01/vdata.c
- X*** Original/vdata.c Wed Jun 20 23:18:02 1990
- X--- Patch01/vdata.c Wed Jun 20 23:47:32 1990
- X***************
- X*** 45,51
- X */
- X vdata()
- X {
- X! int x = 0, flg = 0, factor = 1, l, m;
- X
- X wclear(mn);
- X wrefresh(mn);
- X
- X--- 45,51 -----
- X */
- X vdata()
- X {
- X! int n = 0, flg = 0, factor = 1, l, m;
- X
- X wclear(mn);
- X wrefresh(mn);
- X***************
- X*** 77,90
- X for (j = 22*i+1; j < 22*i+23; j++) {
- X if (j > gtot)
- X break;
- X! x = sub1[j];
- X! mvwaddstr(graph, j-22*i, 0, e[x].name);
- X! wmove(graph, j-22*i, 13); wprintw(graph, "%s", e[x].sym);
- X! wmove(graph, j-22*i, 18); wprintw(graph, "%-d", e[x].anum);
- X! wmove(graph, j-22*i, 22); wprintw(graph, "%-d", e[x].amass);
- X! wmove(graph, j-22*i, 26); wprintw(graph, "%-d", e[x].fam);
- X! wmove(graph, j-22*i, 29); wprintw(graph, "%-d", e[x].row);
- X! if (e[x].val == VAL) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*1, 31, "X");
- X wstandend(graph);
- X
- X--- 77,90 -----
- X for (j = 22*i+1; j < 22*i+23; j++) {
- X if (j > gtot)
- X break;
- X! n = sub1[j];
- X! mvwaddstr(graph, j-22*i, 0, e[n].name);
- X! wmove(graph, j-22*i, 13); wprintw(graph, "%s", e[n].sym);
- X! wmove(graph, j-22*i, 18); wprintw(graph, "%-d", e[n].anum);
- X! wmove(graph, j-22*i, 22); wprintw(graph, "%-d", e[n].amass);
- X! wmove(graph, j-22*i, 26); wprintw(graph, "%-d", e[n].fam);
- X! wmove(graph, j-22*i, 29); wprintw(graph, "%-d", e[n].row);
- X! if (e[n].val == VAL) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*1, 31, "X");
- X wstandend(graph);
- X***************
- X*** 89,95
- X mvwaddstr(graph, j-22*1, 31, "X");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 31); wprintw(graph, "%d", e[x].val);
- X }
- X if (e[x].melt == MEL) {
- X wstandout(graph);
- X
- X--- 89,95 -----
- X mvwaddstr(graph, j-22*1, 31, "X");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 31); wprintw(graph, "%d", e[n].val);
- X }
- X if (e[n].melt == MEL) {
- X wstandout(graph);
- X***************
- X*** 91,97
- X } else {
- X wmove(graph, j-22*i, 31); wprintw(graph, "%d", e[x].val);
- X }
- X! if (e[x].melt == MEL) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 33, "N/F");
- X wstandend(graph);
- X
- X--- 91,97 -----
- X } else {
- X wmove(graph, j-22*i, 31); wprintw(graph, "%d", e[n].val);
- X }
- X! if (e[n].melt == MEL) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 33, "N/F");
- X wstandend(graph);
- X***************
- X*** 96,102
- X mvwaddstr(graph, j-22*i, 33, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 33); wprintw(graph, "%-d", e[x].melt);
- X }
- X if (e[x].boil == BOI) {
- X wstandout(graph);
- X
- X--- 96,102 -----
- X mvwaddstr(graph, j-22*i, 33, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 33); wprintw(graph, "%-d", e[n].melt);
- X }
- X if (e[n].boil == BOI) {
- X wstandout(graph);
- X***************
- X*** 98,104
- X } else {
- X wmove(graph, j-22*i, 33); wprintw(graph, "%-d", e[x].melt);
- X }
- X! if (e[x].boil == BOI) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 38, "N/F");
- X wstandend(graph);
- X
- X--- 98,104 -----
- X } else {
- X wmove(graph, j-22*i, 33); wprintw(graph, "%-d", e[n].melt);
- X }
- X! if (e[n].boil == BOI) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 38, "N/F");
- X wstandend(graph);
- X***************
- X*** 103,109
- X mvwaddstr(graph, j-22*i, 38, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 38); wprintw(graph, "%-d", e[x].boil);
- X }
- X if (e[x].fio == FIO) {
- X wstandout(graph);
- X
- X--- 103,109 -----
- X mvwaddstr(graph, j-22*i, 38, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 38); wprintw(graph, "%-d", e[n].boil);
- X }
- X if (e[n].fio == FIO) {
- X wstandout(graph);
- X***************
- X*** 105,111
- X } else {
- X wmove(graph, j-22*i, 38); wprintw(graph, "%-d", e[x].boil);
- X }
- X! if (e[x].fio == FIO) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 43, "N/F");
- X wstandend(graph);
- X
- X--- 105,111 -----
- X } else {
- X wmove(graph, j-22*i, 38); wprintw(graph, "%-d", e[n].boil);
- X }
- X! if (e[n].fio == FIO) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 43, "N/F");
- X wstandend(graph);
- X***************
- X*** 110,116
- X mvwaddstr(graph, j-22*i, 43, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 43); wprintw(graph, "%3d", e[x].fio);
- X }
- X if (e[x].year == YEA) {
- X wstandout(graph);
- X
- X--- 110,116 -----
- X mvwaddstr(graph, j-22*i, 43, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 43); wprintw(graph, "%3d", e[n].fio);
- X }
- X if (e[n].year == YEA) {
- X wstandout(graph);
- X***************
- X*** 112,118
- X } else {
- X wmove(graph, j-22*i, 43); wprintw(graph, "%3d", e[x].fio);
- X }
- X! if (e[x].year == YEA) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 47, "B.C.");
- X wstandend(graph);
- X
- X--- 112,118 -----
- X } else {
- X wmove(graph, j-22*i, 43); wprintw(graph, "%3d", e[n].fio);
- X }
- X! if (e[n].year == YEA) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 47, "B.C.");
- X wstandend(graph);
- X***************
- X*** 117,123
- X mvwaddstr(graph, j-22*i, 47, "B.C.");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 47); wprintw(graph, "%-d", e[x].year);
- X }
- X if (e[x].eneg == ENG) {
- X wstandout(graph);
- X
- X--- 117,123 -----
- X mvwaddstr(graph, j-22*i, 47, "B.C.");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 47); wprintw(graph, "%-d", e[n].year);
- X }
- X if (e[n].eneg == ENG) {
- X wstandout(graph);
- X***************
- X*** 119,125
- X } else {
- X wmove(graph, j-22*i, 47); wprintw(graph, "%-d", e[x].year);
- X }
- X! if (e[x].eneg == ENG) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 52, "N/F");
- X wstandend(graph);
- X
- X--- 119,125 -----
- X } else {
- X wmove(graph, j-22*i, 47); wprintw(graph, "%-d", e[n].year);
- X }
- X! if (e[n].eneg == ENG) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 52, "N/F");
- X wstandend(graph);
- X***************
- X*** 124,130
- X mvwaddstr(graph, j-22*i, 52, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 52); wprintw(graph, "%1.1f", e[x].eneg);
- X }
- X if (e[x].spht == SPHT) {
- X wstandout(graph);
- X
- X--- 124,130 -----
- X mvwaddstr(graph, j-22*i, 52, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 52); wprintw(graph, "%1.1f", e[n].eneg);
- X }
- X if (e[n].spht == SPHT) {
- X wstandout(graph);
- X***************
- X*** 126,132
- X } else {
- X wmove(graph, j-22*i, 52); wprintw(graph, "%1.1f", e[x].eneg);
- X }
- X! if (e[x].spht == SPHT) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 56, "N/F");
- X wstandend(graph);
- X
- X--- 126,132 -----
- X } else {
- X wmove(graph, j-22*i, 52); wprintw(graph, "%1.1f", e[n].eneg);
- X }
- X! if (e[n].spht == SPHT) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 56, "N/F");
- X wstandend(graph);
- X***************
- X*** 131,137
- X mvwaddstr(graph, j-22*i, 56, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 56); wprintw(graph, "%1.2f", e[x].spht);
- X }
- X if (e[x].dens == DENS) {
- X wstandout(graph);
- X
- X--- 131,137 -----
- X mvwaddstr(graph, j-22*i, 56, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 56); wprintw(graph, "%1.2f", e[n].spht);
- X }
- X if (e[n].dens == DENS) {
- X wstandout(graph);
- X***************
- X*** 133,139
- X } else {
- X wmove(graph, j-22*i, 56); wprintw(graph, "%1.2f", e[x].spht);
- X }
- X! if (e[x].dens == DENS) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 61, "N/F");
- X wstandend(graph);
- X
- X--- 133,139 -----
- X } else {
- X wmove(graph, j-22*i, 56); wprintw(graph, "%1.2f", e[n].spht);
- X }
- X! if (e[n].dens == DENS) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 61, "N/F");
- X wstandend(graph);
- X***************
- X*** 139,146
- X wstandend(graph);
- X } else {
- X wmove(graph, j-22*i, 61);
- X! if (e[x].dens > 9.99)
- X! wprintw(graph, "%2.1f", e[x].dens);
- X else
- X wprintw(graph, "%1.2f", e[x].dens);
- X }
- X
- X--- 139,146 -----
- X wstandend(graph);
- X } else {
- X wmove(graph, j-22*i, 61);
- X! if (e[n].dens > 9.99)
- X! wprintw(graph, "%2.1f", e[n].dens);
- X else
- X wprintw(graph, "%1.2f", e[n].dens);
- X }
- X***************
- X*** 142,148
- X if (e[x].dens > 9.99)
- X wprintw(graph, "%2.1f", e[x].dens);
- X else
- X! wprintw(graph, "%1.2f", e[x].dens);
- X }
- X if (e[x].arad == ARD) {
- X wstandout(graph);
- X
- X--- 142,148 -----
- X if (e[n].dens > 9.99)
- X wprintw(graph, "%2.1f", e[n].dens);
- X else
- X! wprintw(graph, "%1.2f", e[n].dens);
- X }
- X if (e[n].arad == ARD) {
- X wstandout(graph);
- X***************
- X*** 144,150
- X else
- X wprintw(graph, "%1.2f", e[x].dens);
- X }
- X! if (e[x].arad == ARD) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 66, "N/F");
- X wstandend(graph);
- X
- X--- 144,150 -----
- X else
- X wprintw(graph, "%1.2f", e[n].dens);
- X }
- X! if (e[n].arad == ARD) {
- X wstandout(graph);
- X mvwaddstr(graph, j-22*i, 66, "N/F");
- X wstandend(graph);
- X***************
- X*** 149,155
- X mvwaddstr(graph, j-22*i, 66, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 66); wprintw(graph, "%1.2f", e[x].arad);
- X }
- X wrefresh(graph);
- X }
- X
- X--- 149,155 -----
- X mvwaddstr(graph, j-22*i, 66, "N/F");
- X wstandend(graph);
- X } else {
- X! wmove(graph, j-22*i, 66); wprintw(graph, "%1.2f", e[n].arad);
- X }
- X wrefresh(graph);
- X }
- END_OF_FILE
- if test 28115 -ne `wc -c <'patch01'`; then
- echo shar: \"'patch01'\" unpacked with wrong size!
- fi
- # end of 'patch01'
- fi
- if test -f 'VERSION' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'VERSION'\"
- else
- echo shar: Extracting \"'VERSION'\" \(54 characters\)
- sed "s/^X//" >'VERSION' <<'END_OF_FILE'
- Currently, you have Chemtab Version 1.0, Patchlevel 1
- END_OF_FILE
- if test 54 -ne `wc -c <'VERSION'`; then
- echo shar: \"'VERSION'\" unpacked with wrong size!
- fi
- chmod +x 'VERSION'
- # end of 'VERSION'
- fi
- echo shar: End of shell archive.
- exit 0
-
-